﻿//
// XN4SL - Xna Framework for Silverlight.
//
using Xn4Sl.Framework;
using System;

namespace Xn4Sl.Framework.Input
{
    /// <summary>
    /// Structure that represents the position of left and right sticks (thumbsticks)
    /// on an Xbox 360 Controller.
    /// </summary>
    public struct GamePadThumbSticks
    {
        private Vector2 left;
        private Vector2 right;

        /// <summary>
        /// Initializes a new instance of the GamePadThumbSticks class.
        /// </summary>
        /// <param name="leftThumbstick">Left stick value. Each axis is clamped between -1.0 and 1.0.</param>
        /// <param name="rightThumbstick">Right stick value. Each axis is clamped between -1.0 and 1.0.</param>
        public GamePadThumbSticks(Vector2 leftThumbstick, Vector2 rightThumbstick)
        {
            this.left = leftThumbstick;
            this.right = rightThumbstick;
        }

        /// <summary>
        /// Returns the position of the left Xbox 360 Controller stick (thumbstick) as a 2D vector. 
        /// </summary>
        public Vector2 Left
        {
            get
            {
                return this.left;
            }
        }

        /// <summary>
        /// Returns the position of the right Xbox 360 Controller stick (thumbstick) as a 2D vector.
        /// </summary>
        public Vector2 Right
        {
            get
            {
                return this.right;
            }
        }
    }
}